<template>
  <uni-tag class="van-tag" :text="slots.default()[0].text||slots.default()[0].children" type="primary" size="normal" :custom-style="customStyle" @click="handleClick"/>
</template>

<script setup>
import {ref, computed,useSlots} from 'vue'
const emit=defineEmits(['click'])
const slots = useSlots()
console.log(`=>(van-tag.vue:9) slots.default[0]`, slots.default()[0]);
const customStyle = computed(() => {
  return `color: ${props.textColor}; background-color:  ${props.color};border-color: #fff;'`
})
const props = defineProps(['color', 'textColor'])
function handleClick(e) {
  emit('click', e)
}
</script>

<style lang="scss" scoped>
.van-tag {
  display: inline-block;
}
</style>